package moje;

import java.util.Observable;

/**
 * Author: Daniel Michalski
 * Date: 14.03.13
 */

public class MyObservable extends Observable {
    public void test() {
        for (int i = 0; i < 10; i++) {
            setChanged();
            notifyObservers(i);

            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                System.out.println("Przerwano sleep wątku");
            }
        }
    }
}
